const { defineConfig } = require("@vue/cli-service");
module.exports = defineConfig({
  transpileDependencies: true,
  devServer: {
    client: {
      webSocketURL: "ws://0.0.0.0:8080/ws",
    },
    //port: 3000, //把8080变9876
    proxy: {
      "/api": {
        target: "http://localhost:3000", // 代理的目标地址
        changeOrigin: true, // 是否设置同源，输入是的
        pathRewrite: {
          "^/api": "", // 路径重写，将请求中的 '/api' 替换为空字符串
        },
      },
    },
  },
});
